package com.dinghui.mybatis.config;

/**
 * @author 蒋明海 on 2019/11/29
 * 业务层异常
 */
public class BizException extends Exception {
    private static final long serialVersionUID = 6269568481329355589L;

    //错误码
    private String errorCode;

    //错误信息
    private String errorMsg;

    public BizException(String errorCode, String errorMsg) {
        super(String.format("错误码：%s，错误信息：%s", errorCode, errorMsg));
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public String getErrorMsg() {
        return errorMsg;
    }
}
